package core

import (
	"gitee.com/binny_w/go-util"
	"go.uber.org/zap"
)

var Storage *util.OSS
var DefaultBucket string

func ossInit() {
	var err error
	Storage, err = util.NewOSS(Config.GetString("oss.accessKey"), Config.GetString("oss.secretKey"), Config.GetString("oss.endpoint"), "")
	if err != nil {
		Logger.Panic("oss error", zap.Error(err))
	}
	DefaultBucket = Config.GetString("oss.default-bucket")
}
